﻿using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NetAssist.Diagnostics;
//using System.Collections;

namespace NetAssistTests
{
  [TestClass()]
  public class QuickStopwatchTest
  {
    [TestMethod()]
    public void QuickStopwatchMainTest()
    {
      using (QuickStopwatch qs = new QuickStopwatch())
        SlowMethodToTime();

      using (QuickStopwatch qs = new QuickStopwatch("Duration"))
        SlowMethodToTime();
    }

    [TestMethod()]
    public void QuickStopwatchTest2()
    {
      QuickStopwatch qs2 = new QuickStopwatch("No explicit dispose");
      SlowMethodToTime();
    }

    private void SlowMethodToTime()
    {
      Thread.Sleep(10);
    }
  }
}